package com.imooc.ecommerce.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.imooc.ecommerce.account.BalanceInfo;
import com.imooc.ecommerce.entity.EcommerceBalance;

/**
 * 用于余额相关的服务接口定义
 * @author zhangshao
 * @since 2023/11/27 23:22
 */
public interface IBalanceService extends IService<EcommerceBalance> {

    /**
     * 获取当前用户余额信息
     */
    BalanceInfo getCurrentUserBalanceInfo();

    /**
     * 扣减用户余额
     * @param balanceInfo
     * @return
     */
    BalanceInfo deductBalance(BalanceInfo balanceInfo);
}
